package com.netintech.common.constant;

import io.jsonwebtoken.Claims;

/**
 * 通用常量信息
 *
 * @author admin
 */
public class Constants {
    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * 通用成功标识
     */
    public static final String SUCCESS = "0";

    /**
     * 通用失败标识
     */
    public static final String FAIL = "1";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 登录用户 redis key
     */
    public static final String LOGIN_TOKEN_KEY = "login_tokens:";
    /**
     * 心跳异常发过通知的设备 redis key
     */
    public static final String NOTICED_HB_EXCEPTION_DEVICE = "noticedHbExceptionDevice";

    /**
     * 验证码有效期（分钟）
     */
    public static final Integer CAPTCHA_EXPIRATION = 2;

    /**
     * 令牌
     */
    public static final String TOKEN = "token";

    /**
     * 令牌前缀
     */
    public static final String TOKEN_PREFIX = "Bearer ";

    /**
     * 令牌前缀
     */
    public static final String LOGIN_USER_KEY = "login_user_key";

    /**
     * 用户ID
     */
    public static final String JWT_USERID = "userid";

    /**
     * 用户名称
     */
    public static final String JWT_USERNAME = Claims.SUBJECT;

    /**
     * 用户头像
     */
    public static final String JWT_AVATAR = "avatar";

    /**
     * 创建时间
     */
    public static final String JWT_CREATED = "created";

    /**
     * 用户权限
     */
    public static final String JWT_AUTHORITIES = "authorities";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    public static final String FACE_ALARM_WS_TYPE = "face";

    public static final String DEVICE_MOVE_WS_TYPE = "deviceMove";

    public static final String API_PAGE_FACE_ALARM_TYPE = "face";
    public static final String API_PAGE_TEMPERATURE_ALARM_TYPE = "temperature";
    public static final String API_PAGE_WATER_LEVEL_ALARM_TYPE = "waterLevel";
    public static final String API_PAGE_WATER_PRESSURE_ALARM_TYPE = "waterPressure";
    public static final String API_PAGE_TOTAL_IOT_ALARM_TYPE = "total";

    public static final String API_PAGE_FACE_ALARM_TYPE_DESC = "人脸识别报警";
    public static final String API_PAGE_TEMPERATURE_ALARM_TYPE_DESC = "温湿度报警";
    public static final String API_PAGE_WATER_LEVEL_ALARM_TYPE_DESC = "水位报警";
    public static final String API_PAGE_WATER_PRESSURE_ALARM_TYPE_DESC = "水压报警";

    /**
     * 设备ws心跳数据type值
     */
    public static final int DEVICE_WS_MSG_TYPE_HB_TIME = 1;
    /**
     * 设备ws信息数据type值
     */
    public static final int DEVICE_WS_MSG_TYPE_INFO = 2;
    /**
     * 设备ws传感器数据type值
     */
    public static final int DEVICE_WS_MSG_TYPE_SENSING_DATA = 3;

    /**
     * 设备ws 信息
     */
    public static final int DEVICE_WS_MSG_TYPE_LOG = 4;


    /**
     * 设备页面移动方向参数
     */
    public static final String DEVICE_MOVE_DIRECTION_UP = "forward";
    public static final String DEVICE_MOVE_DIRECTION_DOWN = "backOff";
    public static final String DEVICE_MOVE_DIRECTION_LEFT = "left";
    public static final String DEVICE_MOVE_DIRECTION_RIGHT = "right";

    /**
     * 开始推流指令
     */
    public static final String DOG_START_PLAY_INSTRUCTIONS = "startPlay";

    /**
     * 开始推流指令
     */
    public static final String VIDEO_KEEP_ALIVE_INSTRUCTIONS = "keepAlive";

    /**
     * 停止推流指令
     */
    public static final String DOG_STOP_PLAY_INSTRUCTIONS = "stopPlay";

    /**
     * 巡逻指令
     */
    public static final String DOG_PATROL_INSTRUCTIONS = "patrol";

}
